![]() |
TEGetPoint |
||||
Header: | TextEdit.h | Carbon status: | Not Recommended | |
Determines the point that corresponds to the specified byte offset of a character and returns the coordinates of that point.
Point TEGetPoint ( SInt16 offset, TEHandle hTE );
A byte offset into the text buffer of an edit structure.
A handle to the edit structure containing the text.
The coordinates of the point that corresponds to the specified byte offset. The TEGetPoint function returns a valid result even when the edit structure does not contain any text. The point returned is based on the values in the structure’s destination rectangle.
In the case of an offset being equal to a line end, which is also the start of the next line, TEGetPoint returns a point corresponding to the line start of the next line. In the case of a dual caret, the primary caret position, the one corresponding to the primary line direction, is returned.
The line height, taken either from the lineHeight field for a monostyled edit structure or from the line-height array, LHElement, for a multistyled edit structure, is also used to determine the vertical component. Both the text direction and the primary line direction are used to determine the horizontal component.
The TEGetPoint function works for both monostyled and multistyled edit structures.
Not recommended in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)